Skip to content

feat(certificate): make key length and validity years configurable#45

Merged
uwemaurer merged 2 commits intoebics-java:masterfrom
mstohr1975:feature/configurable-certificate-params
Apr 9, 2026
Merged

feat(certificate): make key length and validity years configurable#45
uwemaurer merged 2 commits intoebics-java:masterfrom
mstohr1975:feature/configurable-certificate-params

Conversation

@mstohr1975
Copy link
Copy Markdown
Contributor

Title

feat(certificate): make key length and validity years configurable

Body

## Summary

This change makes certificate generation parameters configurable without changing existing defaults:

- `ebics.key.length` (default: `2048`)
- `ebics.cert.validity.years` (default: `10`)

## Motivation

Different banks and compliance profiles may require different key sizes and certificate validity windows.
Today this behavior is fixed in code.

## Changes

- Read key length from `System.getProperty("ebics.key.length")`
- Read certificate validity years from `System.getProperty("ebics.cert.validity.years")`
- Keep backward-compatible defaults when values are absent/invalid
- Add tests for both overrides in `CertificateManagerTest`

## Backward compatibility

- No behavior change for existing users unless properties are explicitly set.

## Validation

- `mvn -B test` passes locally

@mstohr1975
Copy link
Copy Markdown
Contributor Author

I pushed a CI guard for fork PRs in this branch (dependency submission now only runs on push or same-repo PRs). Until this is merged, please treat the dependency-submission check as non-blocking for fork contributions.

@mstohr1975 mstohr1975 mentioned this pull request Apr 8, 2026
@uwemaurer
Copy link
Copy Markdown
Collaborator

LGTM

@mstohr1975
Copy link
Copy Markdown
Contributor Author

Thx, feel free to merge it.

@uwemaurer uwemaurer marked this pull request as ready for review April 9, 2026 09:30
@uwemaurer uwemaurer merged commit 6feb6ad into ebics-java:master Apr 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants